package com.expert.layui;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

/**
 * Created by Mankind on 2018/2/2.
 */
public class LayuiNav {
    //资源名称
    private String title;
    //资源图标
    private String icon;
    //资源链接
    private String href;
    //是否展开
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Boolean spread;
    //子菜单
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private List<LayuiNav> children;
    //是否跳转
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String target;

    public LayuiNav() {
        this.spread=false;
    }

    public LayuiNav(String title, String icon, Boolean target) {
        this.spread=false;
        this.title = title;
        this.icon = icon;
        if(target==true){
            this.target="_blank";
        }
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public Boolean getSpread() {
        return spread;
    }

    public void setSpread(Boolean spread) {
        this.spread = spread;
    }

    public List<LayuiNav> getChildren() {
        return children;
    }

    public void setChildren(List<LayuiNav> children) {
        this.children = children;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }
}
